/*
 * @Author: 0x9DEFA478
 * @Date: 2023-02-24 19:01:31
 * @LastEditTime: 2023-02-24 20:40:29
 * @LastEditors: 0x9DEFA478
 * @Description: 
 * QQ:2652450237
 * ============================================================================================================================================
 * 
 * 
 * 
 *                                                                                               ************      ****************************
 *                                                                                             ************      ****************************  
 *                                                                                           ************      ****************************    
 *                                                                                         ************      ****************************      
 *                                                                                       ************      ************                        
 *                                                                                     ************      ************                          
 *                                                                                   ************      ************                            
 *                                                                                 ************      ************                              
 *                                                                               ************      ************                                
 *                                                                             ************      ************                                  
 *                                                                           ************      ************                                    
 *                                                                         ************      ************                                      
 *                                                                       ************      ************                                        
 *                                                                     ************      ************                                          
 *                                                                   ************      ************                                            
 *                                                                 ************      ************                                              
 *                                                               ************      ************                                                
 *                                                             ************      ************                                                  
 *                                                           ************      ************                                                    
 *                                                         ************      ************                                                      
 *                                                       ************      ************                                                        
 *                                                     ************      ************                                                          
 *                                                   ************      ************                                                            
 *                                                 ************      ************                                                              
 *                                               ************      ************                                                                
 *                                             ************      ************                                                                  
 *                                           ************      ************                                                                    
 *                                         ************      ************                                                                      
 *                                       ************      ************                                                                        
 *                                     ************      ************                                                                          
 *                                   ************      ************                                                                            
 *                                 ************      ************                                                                              
 *                               ************      ************                                                                                
 *                             ************      ************                                                                                  
 *                           ************      ************                                                                                    
 *                         ************      ************                                                                                      
 *       ****************************      ************                                                                                        
 *     ****************************      ************                                                                                          
 *   ****************************      ************                                                                                            
 * ****************************      ************                                                                                              
 * 
 * 
 * 
 * ============================================================================================================================================
 * 
 */
#include "VAction.h"




VAction::VAction(QObject* parent):QAction(parent){

  eventConnect();
}

VAction::VAction(const QString& text,QObject* parent):QAction(text,parent){

  eventConnect();
}

VAction::VAction(const QIcon& icon,const QString& text,QObject* parent):QAction(icon,text,parent){
  eventConnect();
}

VAction::~VAction(){
}




void VAction::eventConnect(){

  v=nullptr;

  connect((QAction*)this,static_cast<void (QAction::*)()>(&QAction::changed),this,static_cast<void (VAction::*)()>(&VAction::changed));
  connect((QAction*)this,static_cast<void (QAction::*)(bool)>(&QAction::enabledChanged),this,static_cast<void (VAction::*)(bool)>(&VAction::enabledChanged));
  connect((QAction*)this,static_cast<void (QAction::*)(bool)>(&QAction::checkableChanged),this,static_cast<void (VAction::*)(bool)>(&VAction::checkableChanged));
  connect((QAction*)this,static_cast<void (QAction::*)()>(&QAction::visibleChanged),this,static_cast<void (VAction::*)()>(&VAction::visibleChanged));
  connect((QAction*)this,static_cast<void (QAction::*)(bool)>(&QAction::triggered),this,static_cast<void (VAction::*)(bool)>(&VAction::triggered));
  connect((QAction*)this,static_cast<void (QAction::*)()>(&QAction::hovered),this,static_cast<void (VAction::*)()>(&VAction::hovered));
  connect((QAction*)this,static_cast<void (QAction::*)(bool)>(&QAction::toggled),this,static_cast<void (VAction::*)(bool)>(&VAction::toggled));

}




void VAction::changed(){
  emit changed(v);
}

void VAction::enabledChanged(bool enabled){
  emit enabledChanged(v,enabled);
}

void VAction::checkableChanged(bool checkable){
  emit checkableChanged(v,checkable);
}

void VAction::visibleChanged(){
  emit visibleChanged(v);
}

void VAction::triggered(bool checked){
  emit triggered(v,checked);
}

void VAction::hovered(){
  emit hovered(v);  
}

void VAction::toggled(bool b){
  emit toggled(v,b);
}



